package core.domain.messages;

import javax.xml.bind.annotation.XmlRootElement;

import core.domain.DataFile;

/**
 * Class used for creating a new Torrent file from the given filename
 */
@XmlRootElement
public class NewFileMessage extends AbstractMessage {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8189731458106762829L;

	private String fileName;
	private DataFile resultDatafDataFile = null;
	
	private NewFileMessage() {
		super(MessageType.NEWFILE);
	}
	
	public NewFileMessage(String fileName) {
		this();
		this.fileName = fileName;
	}
	
	
	public String getFileName() {
		return fileName;
	}
	
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	
	public DataFile getResultDatafDataFile() {
		return resultDatafDataFile;
	}
	
	public void setResultDatafDataFile(DataFile resultDatafDataFile) {
		this.resultDatafDataFile = resultDatafDataFile;
	}

	@Override
	public String toString() {
		return "NewFileMessage [fileName=" + fileName + "] super: "+super.toString();
	}
	
}
